import request from '@/utils/request'

// 查询全部数据
export function getDataApi(query) {
  return request({
    url: '/data/list',
    method: 'get',
    params: query
  })
}

// 修改首页数据
export function editDataApi(data) {
  return request({
    url: '/data/update',
    method: 'post',
    data
  })
}

// 获取收益列表
export function getIncomeApi(query) {
  return request({
    url: '/income/list',
    method: 'get',
    params: query
  })
}
export function editIncomeApi(data) {
  return request({
    url: '/income',
    method: 'post',
    data
  })
}

export function delIncomeApi(data) {
  return request({
    url: `/income/${data.id}`,
    method: 'delete',

  })
}
// 获取银行提现列表
export function getBankApi(query) {
  return request({
    url: '/bank/list',
    method: 'get',
    params: query
  })
}

export function editBankApi(data) {
  return request({
    url: '/bank',
    method: 'post',
    data
  })
}

export function getWorkApi(query) {
  return request({
    url: '/work/list',
    method: 'get',
    params: query
  })
}

export function editWorkApi(data) {
  return request({
    url: '/work',
    method: 'post',
    data
  })
}
export function delWorkApi(data) {
  return request({
    url: `/work/${data.id}`,
    method: 'delete',

  })
}
export function getNoticeApi(query) {
  return request({
    url: '/notice/list',
    method: 'get',
    params: query
  })
}

export function editNoticeApi(data) {
  return request({
    url: '/notice',
    method: 'post',
    data
  })
} export function delNoticeApi(data) {
  return request({
    url: `/notice/${data.id}`,
    method: 'delete',

  })
}
export function getAdvancedApi(query) {
  return request({
    url: '/advanced/list',
    method: 'get',
    params: query
  })
}

export function editAdvancedApi(data) {
  return request({
    url: '/advanced',
    method: 'post',
    data
  })
} export function delAdvancedApi(data) {
  return request({
    url: `/advanced/${data.id}`,
    method: 'delete',

  })
}
export function getUserApi(query) {
  return request({
    url: '/user/list',
    method: 'get',
    params: query
  })
}
export function editUserApi(data) {
  return request({
    url: '/user',
    method: 'post',
    data
  })
} export function delUserApi(data) {
  return request({
    url: `/user/${data.id}`,
    method: 'delete',

  })
}